<!DOCTYPE html>
<html ng-app="app" ng-controller="indexCtrl" style="height: 100%">
<head>
    <title>首页 {{getEnviroment()}}</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=8; IE=9; IE=EDGE;">

    <link href="./build/common/base.css" rel="stylesheet">
    <script type="text/javascript" src="./assets/app-conf.js"></script>
    <script type="text/javascript" src="./build/common/base.js"></script>
    <script type="text/javascript" src="./build/common/ngEdit.js"></script>
    <script type="text/javascript" src="./build/home/index.js"></script>
    <script type="text/javascript" src="./assets/js/plugins/pace/pace.min.js"></script>
</head>
<body class="fixed-sidebar full-height-layout gray-bg" style="overflow:hidden" >
<div id="wrapper">
    <!--左侧导航开始-->
    <nav class="navbar-default navbar-static-side" role="navigation">
        <div class="nav-close"><i class="fa fa-times-circle"></i>
        </div>
        <div class="sidebar-collapse">
            <ul class="nav" id="side-menu">
                <!-- 个人信息 -->
                <li class="nav-header">
                    <div class="dropdown profile-element">
                        <span><img alt="image" src="./assets/img/etech/logo.png" style="width: 172px; height: 50px;"/></span>
                    </div>
                    <div class="logo-element">ETech-BPM
                    </div>
                </li>
                <!--菜单 -->
                <li ng-repeat="item in memus" class="{{item.opened==1 && item.children.length ?'active':''}}" ng-if="item.enable">
                    <a href="javascript:void(0);" ng-click="menuClick(item)" ng-class="{active:item.children.length==0&&item.active}">
                        <span class="fa {{item.icon||'fa-plus'}}"></span>
                        <span class="nav-label">{{item.name}}</span>
                        <span class="fa arrow" ng-if="item.children.length"></span>
                    </a>
                    <ul class="nav nav-second-level" ng-if="item.children.length">
                        <li ng-repeat="second in item.children" ng-if="second.enable">
                            <a class="J_menuItem {{second.active}}" ng-click="menuClick(second)">
                                {{second.name}}<span ng-if="second.children" class="fa arrow"></span>
                            </a>
                            <ul class="nav nav-third-level" ng-if="second.children.length">
                                <li ng-repeat="third in second.children" ng-if="third.enable">
                                    <a class="J_menuItem" ng-click="menuClick(third)" >
                                        {{third.name}}
                                        <span class="fa arrow" ng-if="third.children.length"></span>
                                    </a>
                                    <ul class="nav nav-four-level" ng-if="third.children.length">
                                        <li ng-repeat="four in third.children" ng-if="third.enable">
                                            <a class="J_menuItem" ng-click="menuClick(four)" >{{four.name}}</a>
                                        </li>
                                    </ul>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </li>
            </ul>
        </div>
    </nav>
    <!--左侧导航结束-->
    <!--右侧部分开始-->
    <div id="page-wrapper" class="gray-bg dashbard-1">
        <div class="row border-bottom">
            <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
                <div class="navbar-header" style="width:80%">
                    <div ng-repeat="topMenu in userRes" ng-click="topClick(topMenu)" ng-if="topMenu.enable"
                         class="{{topMenu.active}} menu-item" href="javascript:void(0);">
                   		  	<span class="menu-head-title-icon">
                   		  		<i class="fa {{topMenu.icon ||'server'}} " ></i>
                   		  	</span>
                        <span>{{topMenu.name}}</span>
                    </div>
                </div>
                <ul class="nav navbar-top-links navbar-right">
                    <li>
                        <a data-toggle="dropdown" class="dropdown-toggle nav-dropdown" href="javascript:void(0);">
                             <span class="clear">
                             <span class="block" ng-show="userMsg.user.fullname">{{userMsg.user.fullname}}<b class="caret"></b></span>
                             </span>
                        </a>
                        <ul class="dropdown-menu dropdown-alerts" style="width: 220px"  ng-show="!hideRights">
                            <li>
                                <a href="#">
                                    <div>
                                        <i class="fa  fa-user">{{userMsg.currentOrg.groupName}}</i>
                                        <span class="pull-right label label-primary mt3">当前组织</span>
                                    </div>
                                </a>
                            </li>
                            <li class="divider" ng-show="userMsg.orgList.length>1 || userMsg.subsystemList.length>1 "></li>
                            <li ng-repeat="org in userMsg.orgList" ng-show="org.groupId != userMsg.currentOrg.groupId">
                                <a href="#">
                                    <div>
                                        <i class="fa fa-users"></i> {{org.groupName}}
                                        <span class="pull-right btn btn-xs btn-success fa fa-exchange mt2" ng-click="changeCurrentOrg(org.groupId)">切换组织</span>
                                    </div>
                                </a>
                            </li>
                            <li ng-repeat="system in userMsg.subsystemList" ng-show="system.id != userMsg.currentSystem.id">
                                <a href="#">
                                    <i class="fa fa-align-justify"></i> {{system.name}}
                                    <span class="pull-right btn btn-xs btn-danger fa fa-exchange mt2" ng-click="changeCurrentSystem(system)">切换系统</span>
                                </a>
                            </li>
                            <li class="divider"></li>
                            <li>
                                <a class="btn btn-sm fa fa-smile-o" ng-click="userInfo()" href="javascript:void(0)">个人资料</a>
                                <a class="btn btn-sm fa fa-key" ng-click="editPassworld()" href="javascript:void(0)">修改密码</a>
                                <a class="btn btn-sm fa fa-edit" ng-click="editUserInfo()" href="javascript:void(0)">修改资料</a>
                            </li>
                            <li class="divider"></li>
                            <li><a href="#" class="fa fa-arrow-circle-right" ng-click="logout()">安全退出</a></li>
                        </ul>
                        <ul class="dropdown-menu dropdown-alerts" style="width: 220px"  ng-show="hideRights">
                            <li><a href="#" class="fa fa-arrow-circle-right" ng-click="logout()">安全退出</a></li>
                        </ul>
                    </li>
                </ul>
                <!-- <ul class="nav navbar-top-links navbar-right">
                    <li class="dropdown">
                        <a class="dropdown-toggle count-info" data-toggle="dropdown" href="javascript:void(0);">
                            <i class="fa fa-bell"></i> <span class="label label-primary">8</span>
                        </a>
                        <ul class="dropdown-menu dropdown-alerts">
                            <li>
                                <a href="#">
                                    <div>
                                        <i class="fa fa-envelope fa-fw"></i>系统目前支持第三方消息
                                        <span class="pull-right text-muted small">4分钟前</span>
                                    </div>
                                </a>
                            </li>
                            <li class="divider"></li>
                            <li>
                                <a href="#">
                                    <div>
                                        <i class="fa fa-qq fa-fw"></i> 如 邮件、短信、钉钉等
                                        <span class="pull-right text-muted small">12分钟前</span>
                                    </div>
                                </a>
                            </li>
                            <li class="divider"></li>
                            <li>
                                <div class="text-center link-block">
                                    <a class="J_menuItem" href="#">
                                        <strong>稍后会推出：站内消息、消息平台消息日志</strong>
                                        <i class="fa fa-angle-right"></i>
                                    </a>
                                </div>
                            </li>
                        </ul>
                    </li>

                </ul> -->
            </nav>
        </div>

        <!-- TAB列 -->
        <div class="row content-tabs" style="background-color: #f5f7f9;">
            <button class="roll-nav roll-left J_tabLeft" ng-show="showPreTabBtn"><i class="fa fa-backward"></i></button>
            <nav class="page-tabs J_menuTabs " ng-class="{ml30:showPreTabBtn,ml20:!showPreTabBtn}">
                <div class="page-tabs-content">
                    <a ng-repeat="menu in openedMenu" id="{{menu.id}}" ng-click="menuClick(menu,true)" href="javascript:void(0);" class="{{menu.active}} J_menuTab">{{menu.name}}
                        <i ng-if="!menu.noclose" class="fa fa-times ml5" ng-click="closeTab(menu)"></i>
                    </a>
                </div>
            </nav>
            <button class="roll-nav roll-right J_tabRight" ng-show="showRightTabBtn" ><i class="fa fa-forward"></i></button>
            <div class="btn-group roll-nav roll-right" style="right: 0px;">
                <button class="dropdown J_tabClose" data-toggle="dropdown"><span class="caret"></span></button>
                <ul role="menu" class="dropdown-menu dropdown-menu-right">
                    <!--  <li class="J_tabShowActive" ng-click="scrollCurrent()"><a>定位当前选项卡</a></li>
                     <li class="divider" ng-click="scrollCurrent()"></li> -->
                    <li class="J_tabCloseAll" ng-click="closeAll()"><a>关闭全部选项卡</a>
                    </li>
                    <li class="J_tabCloseOther" ng-click="closeOthers()"><a>关闭其他选项卡</a>
                    </li>
                </ul>
            </div>
        </div>
        <!-- iframe 内容区 -->
        <div class="row J_mainContent" id="content-main">
            <iframe class="J_iframe {{menu.active=='active'?'iframe-block':'iframe-none'}}" width="100%" height="100%"  frameborder="0"  seamless ng-repeat="menu in openedMenu"
                    ng-src="{{menu.url | trustedAsResourceUrl}}" id="{{menu.id}}iframe"></iframe>
        </div>

        <div class="footer">
            <div class="pull-right">&copy; ETech-BPM ©2020</div>
        </div>
    </div>
    <!--右侧部分结束-->
</div>
</body>
</html>
<style>
    .iframe-block{ display:block }
    .iframe-none{ display:none; }

    *{ -webkit-user-select: none; }

    ::-webkit-scrollbar-thumb {
        background-color:#f5f5f5;
    }

    .nav-header{
        height: 63px;
        padding: 2px 12px;
        border-bottom:1px solid #333;
    }

    .navbar-static-side{
        opacity:0.85;
    }

    .nav-item{
        display: inline;line-height: 40px;font-size: 18px;
    }

    .btn-primary {
        margin:10px 0 10px 10px;
        0background-color: #609e94;
        border-color: transparent;
        0color: #fff;
        background-color: transparent;
        color: #609e94;
    }

    .btn-primary.menuActive{
        background-color: #18a689;
        border-color: #18a689;
        color: #fff;
    }


    .nav>li.active {
        border-left: 4px solid #F0F0F0;
        background: transparent;
    }
</style>
